<template>
    <div class="center_div">
        <el-table :data="applyList" style="margin-top: 10px">
            <el-table-column prop="username" label="姓名" min-width="90"></el-table-column>
            <el-table-column prop="applyModule" label="申请模块" min-width="90">
                <template slot-scope="scope">
                    <el-tag type="success">{{scope.row.applyModule}}</el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="useTime" label="时间" min-width="120"></el-table-column>
            <el-table-column prop="region" label="用途/范围" min-width="120"></el-table-column>
            <el-table-column prop="reason" label="申请原因" min-width="120" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column label="当前审批人" min-width="90">
                <template slot-scope="scope">
                    <el-tag v-if="scope.row.status === 0 " type="warning">组长审批</el-tag>
                    <el-tag v-if="scope.row.status === 1 " type="warning">部长审批</el-tag>
                    <el-tag v-if="scope.row.status === 2 " type="success">审批完成</el-tag>
                </template>
            </el-table-column>
            <el-table-column label="操作" min-width="150" align="center">
                <template slot-scope="scope">
                    <el-button type="success" @click="pass(scope.row.meetingid)">通过</el-button>
                    <el-button type="warning" @click="unpass(scope.row.meetingid)">驳回</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        name: "amuse-grant",
        data() {
            return{
                applyList:  [
                    {username: '魏小肖' ,applyModule: '用章申请', useTime: '2021-02-08 -> 2021-05-04', reason: '办公使用', region: '文件盖章', isPersonal: '1', otherPersonal: '',status: 0},
                    {username: '魏小肖' ,applyModule: '用车申请', useTime: '2021-02-08 -> 2021-05-04', reason: '开车带妹妹去兜风,哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈', region: '北京市', isPersonal: '1', otherPersonal: '',status: 1},
                    {username: '魏小肖' ,applyModule: '卫生纸申请', useTime: '2021-02-08 -> 2021-05-04', reason: '厕所没有纸啦', region: '测试', isPersonal: '1', otherPersonal: '',status: 2}
                ]
            }
        },
        created() {
            // this.fetchApplyList()
        },
        methods: {
            // async fetchApplyList(){
            //     let {code ,data ,msg} = await this.$post('/##')
            //     if(code === 200) {
            //         this.applyList = data
            //     }else {
            //         this.$message.error(msg)
            //     }
            // },
            pass() {},
            unpass() {}
        }
    }
</script>

<style >
    .center_div{
        width: 60%;
        margin:0 auto;
        margin-bottom: 50px;
    }
</style>